home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / misc / wclass20.zip / BC3HEAD.SCT < prev    next >
Text File  |  1995-01-17  |  6KB  |  151 lines

  1.  
  2. // Class: CLASS                     //Borland C++ 3.X
  3.  
  4. #ifndef __$TRUNCATE_EIGHT$CLASS$_H  //Required for current class
  5.   #define __$TRUNCATE_EIGHT$CLASS$_H
  6.  
  7. #ifndef __IOSTREAM_H            //Required for cin and cout
  8.   #include <iostream.h>                 
  9. #endif
  10.  
  11. [                               //Required for base classes
  12. #ifndef __$TRUNCATE_EIGHT$BASE_CLASS$_H
  13.   #include "TRUNCATE_EIGHT$BASE_CLASS$.h"
  14. #endif
  15. ]                               
  16.                 
  17. [#include <INCLUDE_FILE>        //Required for include files
  18. ]
  19.  
  20. [                               //Required for 1:1 associated classes
  21. #ifndef __$TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS$_H
  22.   #include "TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS.h"
  23. #endif
  24. ]                                                               
  25.  
  26. [                               //Required for 1:1 aggregation (part) classes
  27. #ifndef __$TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$_H
  28.   #include "TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$.h"
  29. #endif
  30. ]                                                               
  31.  
  32. [                               //Required for 1:M associated classes
  33. #ifndef __$TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$_H
  34.   #include "TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$.h"
  35. #endif
  36. ]                                                               
  37.  
  38. [                               //Required for 1:M aggregation (part) classes
  39. #ifndef __$TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$_H
  40.   #include "TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$.h"
  41. #endif
  42. ]
  43.             
  44. class CLASS[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS     
  45. { [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
  46.   [ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
  47.   [AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
  48.   [BI_ListImp <ASSOCIATION_MANY_CLASS> ASSOCIATION_MANY_NAME$;]
  49.   [BI_ListImp <AGGREGATION_MANY_CLASS> AGGREGATION_MANY_NAME$;]
  50.  
  51. public:
  52.             //Default constructor
  53.             //Update to access base class attributes 
  54.             //Update to access 1:1 part class attributes 
  55.             //Update to access 1:M part class attributes
  56.             //Update to access 1:1 associated class attributes
  57.             //Update to access 1:M associated class attributes
  58.             //Ensure initial values entered
  59.   CLASS () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL]  { } 
  60.  
  61.             //Constructor with arguments
  62.   CLASS ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )       
  63.   : [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }        
  64.             
  65.   
  66.             //Copy constructor
  67.             //Update to access 1:M part class attributes
  68.             //Update to access 1:1 associated class attributes
  69.             //Update to access 1:M associated class attributes      
  70.   CLASS (const CLASS$& a$CLASS ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS),DELETE_LAST_SYMBOL]
  71.   { [  ATTRIBUTE_NAME = a$CLASS$.$ATTRIBUTE_NAME;]
  72.     [AGGREGATION_ONE_NAME = a$CLASS$.$AGGREGATION_ONE_NAME;]            
  73.   }                                     
  74.  
  75.             //Operator= Assignment Operator
  76.             //Update to access 1:M part class attributes
  77.             //Update to access 1:1 associated class attributes
  78.             //Update to access 1:M associated class attributes      
  79.   CLASS operator= (const CLASS$& a$CLASS)
  80.   { if (this == &a$CLASS) return *this;          
  81.   [BASE_CLASS$::operator= (a$CLASS);]
  82.   [ATTRIBUTE_NAME = a$CLASS$.$ATTRIBUTE_NAME;]
  83.   [AGGREGATION_ONE_NAME = a$CLASS$.$AGGREGATION_ONE_NAME;]      
  84.   return *this;                                                                                                 
  85.   }                                     
  86.  
  87.             //Operator== Equality Operator
  88.             //Update to access 1:M part class attributes
  89.             //Update to access 1:1 associated class attributes
  90.             //Update to access 1:M associated class attributes      
  91.   int operator== (const CLASS$& a$CLASS)
  92.   { return (
  93. [  (BASE_CLASS$::operator== (a$CLASS)) &&]
  94. [  (AGGREGATION_ONE_NAME == a$CLASS$.$AGGREGATION_ONE_NAME) &&]
  95. [  (ATTRIBUTE_NAME == a$CLASS$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
  96.   );
  97.   }                             
  98.     
  99.             //Operator<< for cout 
  100.   friend ostream& operator<< (ostream& os, CLASS$& a$CLASS);
  101.  
  102.             //Operator<< for cin
  103.   friend istream& operator>> (istream& is, CLASS$& a$CLASS);
  104.                 
  105.             
  106. [                       //Get accessor function for attribute
  107.   ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
  108.   {return ATTRIBUTE_NAME$;
  109.   }
  110. ]                       
  111.             
  112. [                       //Set accessor function for attribute
  113.   void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
  114.   { ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
  115.   }
  116. ]                       
  117.  
  118. [                       //Get accessor function for 1:1 aggregation
  119.   AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$() 
  120.   {return AGGREGATION_ONE_NAME$;
  121.   }
  122. ]                       
  123.             
  124. [                       //Set accessor function for 1:1 aggregation
  125.   void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
  126.   { AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
  127.   }
  128. ]                       
  129.  
  130. [                       //Get accessor function for 1:1 association
  131.   ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
  132.   {return ASSOCIATION_ONE_NAME$;
  133.   }
  134. ]                       
  135.             
  136. [                       //Set accessor function for 1:1 association
  137.   void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
  138.   { ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
  139.   }
  140. ]
  141.         
  142. [  CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
  143.  
  144.   ~ CLASS ( ) { }       //Destructor
  145. };
  146.  
  147. #endif
  148.  
  149.  
  150.